import { ref } from 'vue';
export const useTableClick = () => {
  const callback = ref(null);

  //注册回调方法
  const clickCallback = (cb) => {
    callback.value = cb;
  };

  //触发回调方法
  const clickHandle = (data) => {
    callback.value && callback.value(data);
  };
  return {
    clickHandle,
    clickCallback,
  };
};
